import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: HomeView,
      children: [
        {
          path: '',
          component: () => import('../views/region/region.vue'),
        },
        {
          path: '/peidianshi',
          component: () => import('../views/region/region1.vue'),
        },
        {
          path: '/peidiangui',
          component: () => import('../views/region/region2.vue'),
        },
        {
          path: '/shujukanban',
          component: () => import('../views/region/region3.vue'),
        },
        {
          path: '/xiangqing',
          component: () => import('../views/region/region4.vue'),
        },
        {
          path: '/yicitu',
          component: () => import('../views/region/yicitu.vue'),
        }
      ],
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('../views/login/index.vue')
    }
  ]
})

export default router
